﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ERPClient
{
    public partial class BOMCreateForm : Form
    {
        private BOMQueryForm bomTable = null;
        public BOMCreateForm()
        {
            InitializeComponent();

            bomTable = new BOMQueryForm();
            bomTable.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            bomTable.TopLevel = false;
            bomTable.Dock = DockStyle.Fill;

            this.splitContainer1.Panel1.Controls.Add(bomTable);
            bomTable.Show();



            grid1.Rows = 50;
            grid1.Cols = 5;

            string[] title2 = { "No", "零件編號", "品名規格", "應用數量", "單位" };
            FlexCell.CellTypeEnum[] type2 = 
                                        {
                                            FlexCell.CellTypeEnum.DefaultType,
                                            FlexCell.CellTypeEnum.TextBox,
                                            FlexCell.CellTypeEnum.TextBox,
                                            FlexCell.CellTypeEnum.TextBox,
                                            FlexCell.CellTypeEnum.ComboBox,
                                        };
            short[] widths2 = { 30, 120, 200, 80, 50};
            for (int i = 0; i < 5; i++)
            {
                grid1.Cell(0, i).Text = title2[i];
                grid1.Column(i).CellType = type2[i];
                grid1.Column(i).Width = widths2[i];
                grid1.Column(i).Alignment = FlexCell.AlignmentEnum.LeftCenter;
            }
        }
    }
}
